package com.wang.gateway.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Arrays;

@Configuration
public class OpenAPIConfig {

    @Bean
    public OpenAPI gatewayOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("OJ项目接口文档")
                        .description("使用Knife4j聚合的OpenAPI 3.0文档")
                        .version("1.0.0"))
                .servers(Arrays.asList(
                        new Server().url("/").description("网关服务")
                ));
    }
}
